<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>技术的继承性</title>
</head>

<body>
    <script>
        function people(name, age, sex, appearance) {
            this.name = name;
            this.age = age;
            this.sex = sex;
            this.appearance = appearance;
            this.fun = function () {
                console.log('大家好我是' + name + sex + '今年' + age + '岁了是个' + appearance + 'boy')
            }
        }
        function student(school) {
        
            this.school=school;
        }
        people.prototype.gun=function(){
            console.log('大家好我是' + this.name + this.sex + '今年' + this.age + '岁了是个' + this.appearance + 'boy在'+this.shcool)
        }

        student.prototype=new people('潘国威','20','男','handsome');
        var pan=new student('合肥经济学院');
        console.log(pan);
        pan.gun();
        pan.fun()
    </script>
</body>

</html>